import { Layout, ConfigProvider } from 'antd';
const { Content } = Layout;
import styles from './index.less';
import '../global.less';
import { exportPDF } from '@/components';
import zhCN from 'antd/locale/zh_CN';
import 'dayjs/locale/zh-cn';
const App = (props) => {
  const exportP = () => {
    exportPDF(Date.now(), document.querySelector('#resumePreview_content'));
  };
  return (
    <ConfigProvider locale={zhCN}>
      <div className={styles.peripheral}>
        <Content className={styles.content}>{props.children}</Content>
        <header className={styles.header}>
          {/* {props.route?.routes.map((ele) => {
          return (
            <Link
              key={ele.path}
              to={ele.path}
              className={styles.link}
              onClick={() => setCheckoutRouter(ele.path)}
            >
              {ele.name}
            </Link>
          );
        })} */}
          <span className={styles.export} onClick={exportP}>
            导出
          </span>
        </header>
      </div>
    </ConfigProvider>
  );
};
export default App;
